/**
 * Created by zhr on 2017/07/12.
 */
import React from "react";

import {Button} from 'fly';
import { Tabs } from 'antd';
const TabPane = Tabs.TabPane;
import './css/style.css';
import Table from './table';
export default class detail extends React.Component {
    constructor(){
        super();
        this.state={
            defaultActiveKey: '1'
        }
        this.enterpriseId = sessionStorage.getItem('enterpriseId');
    }

    componentWillMount() {
        let defaultActiveKey = this.props.location.state.defaultActiveKey;
        console.log(this.props.location.state.defaultActiveKey)
        defaultActiveKey && this.setState({
            defaultActiveKey: defaultActiveKey
        })
    }


    callback(key) {

    }


    render() {
        const { defaultActiveKey } = this.state;
        return (
            <div className="_product_progress_tab">
                <br/>
                <Tabs defaultActiveKey={defaultActiveKey} onChange={this.callback}>
                    <TabPane tab="裁剪" key="1">
                        <Table record={this.props.location.state.record} ref={'table_'} type="1"/>
                    </TabPane>
                    <TabPane tab="缝制" key="2">
                        <Table record={this.props.location.state.record} ref={'table_'}  type="2"/>
                    </TabPane>
                    <TabPane tab="后整" key="3">
                        <Table record={this.props.location.state.record} ref={'table_'}  type="3"/>
                    </TabPane>
                    <TabPane tab="包装" key="4">
                        <Table record={this.props.location.state.record} ref={'table_'}  type="4"/>
                    </TabPane>
                </Tabs>
            </div>
        )
    }
}
